   cd, current = old_dir
   outputpath = old_dir + '/figures'
   if not file_test(outputpath) then file_mkdir, outputpath
   content = ''
   openr, lun, 'parameters',/get_lun
   while eof(lun) ne 1 do begin
      readf, lun, content
      if strpos(content, 'datavis_path') ne -1 then begin
         path_start = strpos(content, "'") + 1
         path_end = strpos(content, "'", /reverse_offset)
         datapath = old_dir + '/' + strmid(content, path_start, path_end - path_start)
      endif
   endwhile
   close, lun
   free_lun, lun
  
   if not file_test(outputpath) then file_mkdir, outputpath

   xsize = 2000
   ysize = 1000
   ps = 0
   char_color = 0
   line_color = 255
   background = 255
   rgb_table = -1
   plot_range = [-100.0, 100.0, 0.0, 100.0]

;   map_plot_2d, var_name = 'te', mesh_flag = 1, outputpath = outputpath, datapath = datapath, plot_range = plot_range,             $
;      xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,            $
;      rgb_table = rgb_table, cpu_color = 0, var_max = 200, var_min = 1d-1, time_start = 71, time_end = 71, log = 1

;   map_plot_2d, var_name = 'beta', outputpath = outputpath, datapath = datapath, plot_range = plot_range, /tick_log, $
;      xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,               $
;      rgb_table = rgb_table, /log, colorbar_format = '(f6.2)', overplot_lv = [0.01, 0.1, 1, 10, 100], var_min = 1d-3, time_start = 0, time_end = 0

   map_plot_2d, var_name = 'te', mesh_flag = 0, outputpath = outputpath, datapath = datapath, plot_range = plot_range, contour_name = 'az',$
      xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,            $
      rgb_table = rgb_table, mag_lv = 32, colorbar_format = '(f6.1)', var_out = var, var_max = 500, var_min = 1d-1, /colorbar_flag,  $
   arrow_len = 0.3, arrow_scl= 10.0, arrow_nx = 24, mag_dir = 2, time_start= 201, time_end = 301, log = 1, mag_field_shift = -0.5, ticks = 5, arrow_name = 'vv'

;   map_plot_2d, var_name = 'jz', mesh_flag = 0, outputpath = outputpath, datapath = datapath, plot_range = plot_range, contour_name = 'az',$
;`      xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,            $
;      rgb_table = rgb_table, mag_lv = 24, colorbar_format = '(f6.1)', var_out = var, /colorbar_flag, var_min = -5.0, var_max = 5, $
;   arrow_len = 0.3, arrow_scl= 10, arrow_nx = 24, mag_dir = 2, time_start= 61, time_end = 61, log = 0, mag_field_shift = -0.5, ticks = 5, arrow_name = 'vv'

   ;map_plot_2d, var_name = 'ro', arrow_flag = 0, outputpath = outputpath, datapath = datapath, plot_range = plot_range, $
   ;   xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,               $
   ;   rgb_table = rgb_table, mag_lv = 24, colorbar_format = '(f5.1)', var_out = var, var_max = 1d3, var_min = 1d-4, /colorbar_flag,        $
   ;arrow_len = 1, arrow_scl= 5, arrow_num = 24, mag_dir = 2, /log, /tick_log, time_start = 0, time_end = 90

   cd, old_dir

end
